@charset "utf-8";
/* CSS Document */
mew-subtitle {
  display: flex;
  justify-content: center;
  margin: 14px 0;

  & > span {
    position: relative;
    color: var(--main);
    padding: 0 47px;

    &:hover {
      &::before {
        left: 12px;
      }

      &::after {
        right: 12px;
      }
    }

    &::before {
      content: "";
      position: absolute;
      top: 50%;
      left: 0;
      width: 20px;
      height: 1px;
      background: var(--theme);
      transition: all .35s;
    }

    &::after {
      content: "";
      position: absolute;
      top: 50%;
      right: 0;
      width: 20px;
      height: 1px;
      background: var(--theme);
      transition: all .35s;
    }
  }
}

mew-music {
  display: block;
  background-color: var(--bg-d) !important;
  max-width: 620px;
  margin: auto !important;

  &:not(.aplayer) {
    padding: 10px 20px;
    font-size: 1.1em;
    border: 1px solid var(--light-b);
    border-radius: 5px;

    &:before {
      content: "\f001";
      font-family: 'FontAwesome';
      color: var(--theme);
      margin-right: 10px;
    }
  }

  .aplayer-list ol li {
    border-top: 1px solid rgba(180, 180, 180, 0.2) !important;

    &.aplayer-list-light {
      background: rgba(200, 200, 200, 0.2) !important;
    }

    &:hover {
      background: rgba(200, 200, 200, 0.2) !important;
    }

  }

  &.aplayer-withlist .aplayer-info {
    border-bottom: none;
  }

  .aplayer-lrc {
    &:before {
      background: linear-gradient(180deg, #c5c5c52b 0, hsla(0, 0%, 100%, 0)) !important;
    }

    &:after {
      background: linear-gradient(180deg, hsl(0deg 0% 100% / 0%) 0, hsl(0deg 0% 100% / 23%)) !important;
    }
  }
}

mew-bilibili {
  display: block;
  position: relative;

  & > iframe {
    position: absolute;
    height: 100%;
    top: 0;
    bottom: 0;
    left: 50%;
    right: 0;
    transform: translateX(-50%);
    border-radius: var(--radius-inner);
  }
}

mew-tabs {
  width: 100%;
  overflow: hidden;
  display: block;
  background: var(--bg-d);
  border: 1px solid var(--light-b);
  border-radius: var(--radius-inner);
  line-height: 26px;
  margin-bottom: 14px;

  .tabs-head {
    width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    display: flex;
    background: var(--bg-h);

    & > div {
      position: relative;
      padding: 0 14px;
      line-height: 40px;
      height: 40px;
      color: var(--dark-b);
      cursor: pointer;
      transition: color .5s;
      white-space: nowrap;
      font-size: 1em;

      &::after {
        content: "";
        position: absolute;
        background: var(--theme);
        bottom: 0;
        left: 14px;
        right: 14px;
        height: 2px;
        opacity: 0;
        border-radius: 2px;
        transform: scaleX(.5);
        transition: opacity .25s, transform .25s;
      }

      &.active {
        color: var(--theme);

        &::after {
          opacity: 1;
          transform: scaleX(1);
        }
      }
    }
  }

  .tabs-body {
    padding: 12px 14px;

    & > div {
      display: none;

      &.active {
        display: block;
      }
    }
  }
}

mew-cloud {
  display: flex;
  align-items: center;
  padding: 10px;
  overflow: hidden;
  border: 1px solid var(--light-b);
  border-radius: var(--radius-inner);
  box-shadow: 1px 1px 5px 0 var(--bg-b);
  background: var(--background);

  .mew-cloud-logo {
    flex-shrink: 0;
    width: 2.4em;
    height: 2.4em;
    margin-right: 10px;
    background-size: 100% 100%;

    &.type-default {
      background-image: url("");
    }

    &.type-360 {
      background-image: url();
    }

    &.type-bd {
      background-image: url();
    }

    &.type-wy {
      background-image: url();
    }

    &.type-ali {
      background-image: url("");
    }

    &.type-github {
      background-image: url("");
    }

    &.type-gitee {
      background-image: url();
    }

    &.type-lz {
      background-image: url("");
    }
  }

  .mew-cloud-desc {
    line-height: normal;
    flex: 1;
    overflow: hidden;

    &-title {
      color: var(--theme);
      margin-bottom: 3px;
      overflow: hidden;
      white-space: nowrap;
      text-overflow: ellipsis;
    }

    &-type {
      font-size: 0.8em;
      overflow: hidden;
      white-space: nowrap;
      text-overflow: ellipsis;
    }
  }

  .mew-cloud-link {
    flex-shrink: 0;
    margin-left: auto;
    background: var(--theme);
    color: #fff;
    width: 2em;
    height: 2em;
    line-height: 2em;
    border-radius: 50%;
    text-align: center;
  }
}

mew-progress {
  display: flex;
  align-items: center;

  .mew-progress-bar {
    height: 10px;
    border-radius: 5px;
    overflow: hidden;
    background: var(--light-b);
    width: 0;
    min-width: 0;
    flex: 1;
    margin-right: 5px;

    &-inner {
      height: 100%;
      overflow: hidden;
      border-radius: 5px;

      &:before {
        content: '';
        display: block;
        height: 100%;
        background-size: 30px 30px;
        animation: progress 750ms linear infinite;
        background-image: linear-gradient(135deg, rgb(255 255 255 / 40%) 25%, transparent 25%, transparent 50%, rgb(255 255 255 / 40%) 50%, rgb(255 255 255 / 40%) 75%, transparent 75%, transparent 100%);
      }
    }
  }

  .mew-progress-value {
    width: 38px;
    color: var(--main);
  }
}

mew-panel {
  display: block;
  overflow: hidden;
  border-radius: var(--radius-inner);
  margin-bottom: 14px;

  .mew-panel-title {
    color: #FFF;
    padding: 6px 12px;
    font-weight: 400;
  }

  .mew-panel-body {
    background: rgb(255 255 255 / 88%);
    padding: 12px 18px;
    position: relative;
  }
}

mew-message {
  display: block;
  padding: 10px;
  border-radius: var(--radius-inner);
  margin-bottom: 14px;

  &::before {
    font: normal normal normal 1.1em/1 FontAwesome;
    margin-right: 8px;
  }

  &[type=error] {
    color: #f46c6b;
    background-color: rgb(255 228 226 / 90%);

    &::before {
      content: '\f057';
    }
  }

  &[type=warning] {
    color: #FEC008;
    background-color: rgb(255 243 215 / 90%);

    &::before {
      content: '\f06a';
    }
  }

  &[type=info] {
    color: #1B72F3;
    background-color: rgb(232 240 255 / 90%);

    &::before {
      content: '\f05a';
    }
  }

  &[type=success] {
    color: #2bde3f;
    background-color: rgb(225 255 228 / 90%);

    &::before {
      content: '\f058';
    }
  }
}

mew-hr {
  display: block;
  height: 4px;
  background-size: 50px 4px;
  margin: 14px 0;
}

mew-timeline {
  display: block;
  border-left: 1px solid var(--light-b);
  margin-bottom: 14px;

  & > div {
    position: relative;
    padding-left: 1.2em;

    &::before {
      content: '';
      position: absolute;
      border-radius: 50%;
      top: 0;
    }

    & + .mew-timeline-title {
      margin-top: 16px;
    }
  }

  .mew-timeline-title {
    color: var(--dark-c);
    font-weight: 500;
    padding-bottom: 5px;

    &::before {
      background-color: #50bfff;
      box-shadow: 0 0 0 0.2em rgb(80 191 255 / 25%);
      left: -0.32em;
      height: 0.6em;
      width: 0.6em;
    }

    &-elem {
      position: relative;
      top: -0.4em;
    }
  }

  .mew-timeline-item {
    font-size: 0.95em;

    &::before {
      background-color: var(--light-a);
      border: 2px solid #50bfff;
      left: -5px;
      height: 5px;
      width: 5px;
    }

    &:not(:last-child) {
      padding-bottom: 16px;
    }

    &-title {
      display: block;
      line-height: 1em;
      margin-bottom: 2px;
      font-weight: 400;
      position: relative;
      top: -0.1em;
    }

    &-content {
      padding: 8px 12px;
      overflow: hidden;
      border-radius: 0 6px 6px 6px;
      background-color: var(--bg-a);
      position: relative;

      * {
        margin: 0 !important;
      }
    }
  }

  .info {

    &.mew-timeline-title {
      color: #1b72f3;

      &::before {
        background-color: #73a3eb;
        box-shadow: 0 0 0 0.2em rgb(115 163 235 / 25%);
      }
    }

    &.mew-timeline-item::before {
      border-color: #73a3eb;
    }

    .mew-timeline-item-content {
      color: #1b72f3;
      background-color: #ecf3ff;
    }
  }

  .warning {

    &.mew-timeline-title {
      color: #fec008;

      &::before {
        background-color: #ffd350;
        box-shadow: 0 0 0 0.2em rgb(255 211 80 / 25%);
      }
    }

    &.mew-timeline-item::before {
      border-color: #ffd350;
    }

    .mew-timeline-item-content {
      color: #fec008;
      background-color: #fdf6e6;
    }
  }

  .success {

    &.mew-timeline-title {
      color: #2bde3f;

      &::before {
        background-color: #6de37a;
        box-shadow: 0 0 0 0.2em rgb(109 227 122 / 25%);
      }
    }

    &.mew-timeline-item::before {
      border-color: #6de37a;
    }

    .mew-timeline-item-content {
      color: #2bde3f;
      background-color: #e9fbeb;
    }
  }

  .error {

    &.mew-timeline-title {
      color: #f46c6b;

      &::before {
        background-color: #ff7776;
        box-shadow: 0 0 0 0.2em rgb(255 119 118 / 25%);
      }
    }

    &.mew-timeline-item::before {
      border-color: #ff7776;
    }

    .mew-timeline-item-content {
      color: #f46c6b;
      background-color: #ffeeed;
    }
  }
}

mew-btn {
  display: inline-block;

  & > .mew-btn {
    color: #fff;
    line-height: 1em;
    padding: 0.5em 12px;
    font-weight: 400;
    display: inline-block;
    background: var(--theme);
    border-radius: var(--radius-inner);

    &:hover {
      color: #fff;
      filter: opacity(.8);
      box-shadow: 0 4px 15px -4px rgb(41 45 52 / 30%);
    }

    & > i {
      margin-right: 6px;
      font-size: 0.9em;
    }
  }
}

mew-quote {
  display: flex;
  margin: 0 18px 14px 18px;

  .mew-quote {
    display: flex;
    margin: 0 auto;
    padding: 10px;

    &:before {
      content: '“';
      color: var(--theme);
      font-size: 2.8em;
      font-family: fantasy;
      line-height: 1;
      margin-right: 14px;
      margin-top: -10px;
    }

    &:after {
      content: '”';
      color: var(--theme);
      font-size: 2.8em;
      font-family: fantasy;
      line-height: 1;
      align-self: flex-end;
      margin-left: 14px;
      margin-bottom: calc(-0.5em - 10px);
    }
  }

  .quote-container {
    display: flex;
    justify-content: center;
  }

  .mew-quote-href {
    padding: 4px;
    display: inline-block;
    background: var(--bg-a);
    transition: all 2s;
    margin-right: 8px;

    &:hover {
      transform: rotate(360deg);
    }

    &, .quote-avatar-hexagon {
      clip-path: polygon(40% 7.67949%, 43.1596% 6.20615%, 46.52704% 5.30384%, 50% 5%, 53.47296% 5.30384%, 56.8404% 6.20615%, 60% 7.67949%, 81.65064% 20.17949%, 84.50639% 22.17911%, 86.97152% 24.64425%, 88.97114% 27.5%, 90.44449% 30.6596%, 91.34679% 34.02704%, 91.65064% 37.5%, 91.65064% 62.5%, 91.34679% 65.97296%, 90.44449% 69.3404%, 88.97114% 72.5%, 86.97152% 75.35575%, 84.50639% 77.82089%, 81.65064% 79.82051%, 60% 92.32051%, 56.8404% 93.79385%, 53.47296% 94.69616%, 50% 95%, 46.52704% 94.69616%, 43.1596% 93.79385%, 40% 92.32051%, 18.34936% 79.82051%, 15.49361% 77.82089%, 13.02848% 75.35575%, 11.02886% 72.5%, 9.55551% 69.3404%, 8.65321% 65.97296%, 8.34936% 62.5%, 8.34936% 37.5%, 8.65321% 34.02704%, 9.55551% 30.6596%, 11.02886% 27.5%, 13.02848% 24.64425%, 15.49361% 22.17911%, 18.34936% 20.17949%);
    }
  }

  .mew-quote-info {
    display: flex;
    justify-content: center;
    flex-direction: column;
  }

  .mew-quote-content {
    margin-bottom: 8px;
    line-height: 1.5em;
  }

  .mew-quote-name {
    color: var(--dark-c);
    align-self: self-end;
    font-size: 0.9em;
    font-style: italic;
    font-weight: 400;

    &:before {
      content: '';
      width: 2.8em;
      height: 1px;
      background: var(--dark-c);
      margin-right: 4px;
      display: inline-block;
      margin-bottom: 0.3em;
    }
  }

  .quote-avatar-hexagon {
    height: 5em;
    width: 5em;
    object-fit: cover;
  }

}

mew-link {

  .mew-link {
    display: flex;
    margin: auto;
    max-width: 420px;
    background: var(--bg-l);
    padding: 12px 12px 9px 12px;
    border-radius: 8px;
    overflow: hidden;
  }

  .mew-link-info {
    flex-grow: 1;
    display: flex;
    justify-content: center;
    flex-direction: column;
  }

  .info-title {
    margin-bottom: 6px;
    color: var(--dark-c);
    line-height: 1.3em;
    display: -webkit-box;
    text-overflow: ellipsis;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
  }

  .info-desc {
    font-size: 0.9em;
    line-height: 1.3em;
    height: 1.3em;
    color: var(--dark-d);
    word-break: break-all;
    display: -webkit-box;
    text-overflow: ellipsis;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 1;

    &:before {
      content: '\f0c1';
      font-family: 'FontAwesome';
      margin-right: 4px;
    }
  }

  .mew-link-image {
    background-color: var(--bg-l);
    position: relative;
    display: block;
    width: 60px;
    height: 60px;
    margin-left: 16px;
    border-radius: 4px;
    overflow: hidden;
    flex-shrink: 0;
  }

  .link-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
  }
}

mew-video {
  display: block;
  text-align: center;

  video {
    max-width: 100%;
    border-radius: var(--radius-inner);
  }
}

mew-photos {
  display: block;
  width: 100%;
  position: relative;
  overflow: hidden;
  margin-bottom: 14px;

  & > div {
    position: absolute;
    display: inline-block;
    overflow: hidden;
    opacity: 0.1;
    margin: 0;
    padding: 0;
    border-radius: 8px;
    cursor: pointer;

    & > img {
      position: absolute;
      transition: opacity 500ms ease-in;
      top: 50%;
      left: 50%;
      margin: 0;
      padding: 0;
      border: none;
      opacity: 0;
    }

    & > .jg-caption {
      opacity: 0;
      position: absolute;
      bottom: 0;
      padding: 5px;
      background-color: #000000;
      left: 0;
      right: 0;
      margin: 0;
      color: white;
      font-size: 0.85em;
      font-weight: 300;
      font-family: sans-serif;
      transition: opacity 300ms ease-in;

      &.jg-caption-visible {
        opacity: 0.7;
      }
    }
  }

  & > .jg-entry-visible {
    opacity: 1;
    background: none;

    & > img {
      opacity: 1;
    }
  }
}

mew-raw {
  display: block;
  margin-bottom: 14px;
}

mew-btn, mew-timeline, mew-quote, mew-link, mew-photos, mew-raw {
  &:not([draw]) {
    display: none;
  }
}

mew-bilibili, mew-cloud, mew-tabs, mew-panel, mew-video {
  &:not([draw]) {
    display: block;
    position: relative;
    height: 2.4em;
    border: 1px solid var(--light-b);
    border-radius: var(--radius-inner);
    box-shadow: 1px 1px 5px 0 var(--bg-b);

    &:before {
      content: '加载中...';
      position: absolute;
      top: 0;
      bottom: 0;
      left: 0;
      right: 0;
      line-height: 2.4em;
      text-align: left;
      padding-left: 12px;
      background: var(--light-a);
    }
  }
}

html.night {
  .mew-cloud-logo, .mew-cloud-link, .mew-progress-bar-inner, mew-panel, mew-message, mew-hr, mew-timeline, mew-btn {
    filter: brightness(.8);
  }
}

@keyframes progress {
  0% {
    background-position: 0 0
  }
  to {
    background-position: 30px 0
  }
}

@media (max-width: 1023px) {

  mew-quote .quote-avatar-hexagon {
    height: 3.6em;
    width: 3.6em;
    object-fit: cover;
  }
}

@media (max-width: 511px) {

  mew-quote {
    margin: 0;

    .quote-container {
      flex-direction: column;
    }

    .mew-quote-avatar {
      text-align: center;
    }

    .quote-avatar-hexagon {
      height: 3.2em;
      width: 3.2em;
    }
  }

  mew-bilibili {
    padding: calc(30%) 0px !important;
  }

  mew-bilibili iframe, mew-video video {
    width: 100% !important;
  }
}